package com.utooo.service.system.impl;


import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.utooo.dao.system.ProductSpecAttributeValueMapper;
import com.utooo.pojo.domain.system.ProductSpecAttributeValueDO;
import com.utooo.pojo.dto.system.inparam.AttributeValueQueryDto;
import com.utooo.service.system.ProductSpecAttributeValueService;
import lombok.RequiredArgsConstructor;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @Description: TODO
 * @Author SJD
 * @Date: 2025/5/9 13:44
 * @Copyright: 南京优通信息科技股份有限公司
 */
@Service
@RequiredArgsConstructor
public class ProductSpecAttributeValueServiceImpl extends ServiceImpl<ProductSpecAttributeValueMapper, ProductSpecAttributeValueDO>
        implements ProductSpecAttributeValueService {
    private final ProductSpecAttributeValueMapper productSpecAttributeValueMapper;

    @Override
    public List<ProductSpecAttributeValueDO> getAttributeValueByTypeCode(AttributeValueQueryDto param) {
        // 根据规则类别编号查询数据
        List<ProductSpecAttributeValueDO> specAttributeValueDOS = productSpecAttributeValueMapper.selectList(new LambdaQueryWrapper<ProductSpecAttributeValueDO>()
                .eq(ProductSpecAttributeValueDO::getAttributeTypeCode, param.getAttributeTypeCode()));
        return specAttributeValueDOS;
    }
}
